unit TeslimatDurumu;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, Buttons;

type
  TTeslimatDurumuF = class(TForm)
    btamam: TBitBtn;
    bvazgec: TBitBtn;
    Onayk: TRadioGroup;
    rbtTerminal: TRadioGroup;
    procedure FormShow(Sender: TObject);
    procedure btamamClick(Sender: TObject);
    procedure bvazgecClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    TeslimSekli: string;
    TerminalAta: string;
    { Public declarations }
  end;

var
  TeslimatDurumuF: TTeslimatDurumuF;

implementation
uses data, UnitGenel;

{$R *.dfm}

procedure TTeslimatDurumuF.FormShow(Sender: TObject);
begin
  YerAyarla(Self, True);
  if TerminalAta <> '' then rbtTerminal.BringToFront;
  if TeslimSekli <> '' then Onayk.BringToFront;

  if TeslimSekli = 'E' then
    Onayk.ItemIndex := 0
  else
    if TeslimSekli = 'K' then
      Onayk.ItemIndex := 1
    else
      if TeslimSekli = 'S' then
        Onayk.ItemIndex := 2;

  if TerminalAta = 'T1' then
    rbtTerminal.ItemIndex := 0
  else
    if TerminalAta = 'T2' then
      rbtTerminal.ItemIndex := 1
    else
      if TerminalAta = 'T3' then
        rbtTerminal.ItemIndex := 2
      else
        if TerminalAta = 'T4' then
          rbtTerminal.ItemIndex := 3
        else
          if TerminalAta = 'T5' then
            rbtTerminal.ItemIndex := 4;
end;

procedure TTeslimatDurumuF.btamamClick(Sender: TObject);
begin
  if TerminalAta <> '' then
    dm.islemid := rbtTerminal.ItemIndex;

  if TeslimSekli <> '' then
    dm.islemid := Onayk.ItemIndex;

  modalresult := mrok;
end;

procedure TTeslimatDurumuF.bvazgecClick(Sender: TObject);
begin
  modalresult := mrcancel;
end;

procedure TTeslimatDurumuF.FormCreate(Sender: TObject);
begin

  TerminalAta := '';
  TeslimSekli := '';

end;

end.

